<html>
<head><meta charset="utf-8"><title>opt-level=1 · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/opt-level.3D1.html">opt-level=1</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="234360757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/opt-level%3D1/near/234360757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/opt-level.3D1.html#234360757">(Apr 13 2021 at 16:42)</a>:</h4>
<p>Does anybody use -Copt-level=1? It seems just as slow as -Copt-level=0 to me — probably because it doesn't do any inlining, which makes the stdlib dog-slow.</p>
<p>Would moving an inlining pass to it be plausible?</p>



<a name="234364245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/opt-level%3D1/near/234364245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/opt-level.3D1.html#234364245">(Apr 13 2021 at 17:04)</a>:</h4>
<p>at my previous job switching to opt-level 1 significantly sped up the test suite (which was dominated by computing password hashes)</p>



<a name="234365608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/opt-level%3D1/near/234365608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/opt-level.3D1.html#234365608">(Apr 13 2021 at 17:12)</a>:</h4>
<p>opt-level=1 runs the alwaysinline pass but afair this level is set to 1 if you have any inline(always) annotations which might explain why you're seeing no appreciable change.</p>



<a name="234440886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/opt-level%3D1/near/234440886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/opt-level.3D1.html#234440886">(Apr 14 2021 at 04:51)</a>:</h4>
<blockquote>
<p>opt-level=1 runs the alwaysinline pass but afair this level is set to 1 if you have any inline(always) annotations which might explain why you're seeing no appreciable change.</p>
</blockquote>
<p>Right, in practice I sometimes use this for debug perf, but IIUC the stdlib is resistant to adding it to things (as it's a heavy hammer)</p>



<a name="234453551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/opt-level%3D1/near/234453551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/opt-level.3D1.html#234453551">(Apr 14 2021 at 07:29)</a>:</h4>
<p>It is possible to enable inlining  pass with <code>-Cinline-threshold</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>